﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Leasson3 : MonoBehaviour
{
    private string inputStr = "";
    private string inputPW = "";
    public Rect rc_user_label;
    public Rect rc_user_input;
    public Rect rc_pass_label;
    public Rect rc_pass_input;
    public Rect rc_slider_horizontal;

    public Rect rc_slider_vertical;
    private float nowValue1 = 50f;
    private float nowValue2 = 50f;
    public int maxLength;
    private void OnGUI()
    {
        #region 知识一 输入框
        #region 普通输入
        //输入框重要参数
        //显示内容
        //最大输入字符串的长度
        GUI.Label(rc_user_label, "账号");
        inputStr = GUI.TextField(rc_user_input, inputStr, maxLength);
        #endregion
        #region 密码输入
        GUI.Label(rc_pass_label, "密码"); 
        inputPW = GUI.PasswordField(rc_pass_input, inputPW, '*', maxLength);

        #endregion
        #endregion

        #region 知识二 拖动条
        #region 水平拖动条
        nowValue1 = GUI.HorizontalSlider(rc_slider_horizontal, nowValue1, 0, 100);
        #endregion
        #region 垂直拖动条
        nowValue2 = GUI.VerticalSlider(rc_slider_vertical, nowValue2, 0, 100);
        #endregion
        #endregion
    }
}
